FUNCTION DCMDeriveNewDictionary(srcDictionary: DCMDictionaryID; containerRef: FSObjectRef; dictionaryName: ConstFSName; invisible: BOOLEAN; recordCapacity: ItemCount; VAR newDictionary: DCMDictionaryID): OSStatus; C;
{
Register dictionary
}
FUNCTION DCMRegisterDictionaryFile(dictionaryFile: FSObjectRef; VAR dictionaryID: DCMDictionaryID): OSStatus; C;
FUNCTION DCMRegisterDictionaryStream(myRegisterProc: DCMRegisterStreamProc; refcon: UNIV Ptr; dictionarySize: ByteCount; VAR dictionaryID: DCMDictionaryID): OSStatus; C;
FUNCTION DCMUnregisterDictionary(dictionaryID: DCMDictionaryID): OSStatus; C;
{
Open dictionary
}
FUNCTION DCMOpenDictionary(dictionaryID: DCMDictionaryID; protectKeySize: ByteCount; protectKey: LogicalAddress; VAR dictionaryRef: DCMDictionaryRef): OSStatus; C;
FUNCTION DCMCloseDictionary(dictionaryRef: DCMDictionaryRef): OSStatus; C;
{
Change access privilege
}
FUNCTION DCMGetDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; timeOutDuration: Duration): OSStatus; C;
FUNCTION DCMReleaseDictionaryWriteAccess(dictionaryRef: DCMDictionaryRef; commitTransaction: BOOLEAN): OSStatus; C;
{
Find records
}
FUNCTION DCMFindRecords(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; findMethod: DCMFindMethodType; preFetchedDataNum: ItemCount; VAR preFetchedData: DCMFieldTag; skipCount: ItemCount; maxRecordCount: ItemCount; VAR recordIterator: DCMFoundRecordIterator): OSStatus; C;
FUNCTION DCMCountRecordIterator(recordIterator: DCMFoundRecordIterator): ItemCount; C;
{$IFC FOR_PTR_BASED_AE }
FUNCTION DCMIterateFoundRecord(recordIterator: DCMFoundRecordIterator; maxKeySize: ByteCount; VAR actualKeySize: ByteCount; keyData: LogicalAddress; VAR uniqueID: DCMUniqueID; VAR dataList: DCMFieldDataList): OSStatus; C;
{$ENDC}
FUNCTION DCMDisposeRecordIterator(recordIterator: DCMFoundRecordIterator): OSStatus; C;
{
Dump dictionary
}
FUNCTION DCMGetNextRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; VAR nextKeySize: ByteCount; nextKeyData: LogicalAddress; VAR nextUniqueID: DCMUniqueID): OSStatus; C;
FUNCTION DCMGetPrevRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; maxKeySize: ByteCount; VAR prevKeySize: ByteCount; prevKeyData: LogicalAddress; VAR prevUniqueID: DCMUniqueID): OSStatus; C;
FUNCTION DCMGetNthRecord(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; serialNum: ItemCount; maxKeySize: ByteCount; VAR keySize: ByteCount; keyData: LogicalAddress; VAR uniqueID: DCMUniqueID): OSStatus; C;
FUNCTION DCMGetRecordSequenceNumber(dictionaryRef: DCMDictionaryRef; keyFieldTag: DCMFieldTag; keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; VAR sequenceNum: ItemCount): OSStatus; C;
FUNCTION DCMCountRecord(dictionaryID: DCMDictionaryID; VAR count: ItemCount): OSStatus; C;
FUNCTION DCMGetDictionaryInformarion(dictionaryID: DCMDictionaryID; VAR accessMethod: DCMAccessMethodID; VAR isProtected: BOOLEAN): OSStatus; C;
FUNCTION DCMGetDictionaryFieldList(dictionaryID: DCMDictionaryID; maxFieldNum: ItemCount; VAR actualFieldNum: ItemCount; VAR fieldTag: DCMFieldTag; VAR fieldType: DCMFieldType): OSStatus; C;
FUNCTION DCMGetDictionaryFieldInfo(dictionaryID: DCMDictionaryID; fieldTag: DCMFieldTag; fieldInfo: DCMFieldInfoRef): OSStatus; C;
FUNCTION DCMGetFileRefFromDictionaryID(dictionaryID: DCMDictionaryID; VAR fileRef: FSObjectRef): OSStatus; C;
FUNCTION DCMGetDictionaryIDFromFile(fileRef: FSObjectRef; VAR dictionaryID: DCMDictionaryID): OSStatus; C;
FUNCTION DCMGetDictionaryIDFromRef(dictionaryRef: DCMDictionaryRef): DCMDictionaryID; C;
FUNCTION DCMGetDictionaryChangeCount(dictionaryID: DCMDictionaryID): UInt32; C;
{
Dictionary property
}
FUNCTION DCMGetDictionaryProperty(dictionaryID: DCMDictionaryID; propertyTag: DCMFieldTag; maxPropertySize: ByteCount; VAR actualSize: ByteCount; propertyValue: LogicalAddress): OSStatus; C;
FUNCTION DCMGetDictionaryPropertyList(dictionaryID: DCMDictionaryID; maxPropertyNum: ItemCount; VAR numProperties: ItemCount; VAR propertyTag: DCMFieldTag): OSStatus; C;
{
Get dictionary stream
}
FUNCTION DCMCreateDictionaryStream(dictionaryID: DCMDictionaryID; VAR stream: DCMDictionaryStreamRef): OSStatus; C;
FUNCTION DCMReadDictionaryStream(stream: DCMDictionaryStreamRef; maxSize: ByteCount; VAR actualSize: ByteCount; buffer: LogicalAddress): OSStatus; C;
FUNCTION DCMDisposeDictionaryStream(stream: DCMDictionaryStreamRef): OSStatus; C;
FUNCTION DCMFindAccessMethodByFeature(neededFeature: DCMAccessMethodFeature; accessMethodIterator: DCMAccessMethodIterator): OSStatus; C;
{
Iterator Operation
}
FUNCTION DCMCountObjectIterator(iterator: DCMObjectIterator): ItemCount; C;
FUNCTION DCMIterateObject(iterator: DCMObjectIterator; VAR objectID: DCMObjectID): OSStatus; C;
FUNCTION DCMResetObjectIterator(iterator: DCMObjectIterator): OSStatus; C;
FUNCTION DCMDisposeObjectIterator(iterator: DCMObjectIterator): OSStatus; C;
{
Register AccessMethod
}
FUNCTION DCMRegisterAccessMethod(accessMethodFile: FSObjectRef; maxAccessMethodNum: ItemCount; VAR accessMethodNum: ItemCount; VAR accessMethod: DCMAccessMethodID): OSStatus; C;
FUNCTION DCMUnregisterAccessMethod(accessMethod: DCMAccessMethodID): OSStatus; C;
{
Get AccessMethod information
}
FUNCTION DCMGetAccessMethodInformation(accessMethod: DCMAccessMethodID; maxNameLen: ByteCount; VAR nameLength: ByteCount; libraryName: LogicalAddress; VAR version: UInt32; VAR feature: DCMAccessMethodFeature): OSStatus; C;
FUNCTION DCMGetAccessMethodFieldInfoList(accessMethod: DCMAccessMethodID; maxFieldNum: ItemCount; VAR numOfField: ItemCount; VAR fieldInfo: DCMFieldInfoRef): OSStatus; C;
{
Operators for DCMFieldInfoRef
}
FUNCTION DCMCreateFieldInfoRef(VAR fieldInfo: DCMFieldInfoRef): OSStatus; C;
FUNCTION DCMDisposeFieldInfoRef(fieldInfo: DCMFieldInfoRef): OSStatus; C;
FUNCTION DCMSetFieldInfoDefaultData(fieldInfo: DCMFieldInfoRef; dataSize: ByteCount; defaultData: ConstLogicalAddress): OSStatus; C;
FUNCTION DCMGetFieldInfoTagType(fieldInfo: DCMFieldInfoRef; VAR fieldTag: DCMFieldTag; VAR fieldType: DCMFieldType; VAR subType: DCMFieldSubType): OSStatus; C;
FUNCTION DCMGetFieldInfoMaxSize(fieldInfo: DCMFieldInfoRef; VAR maximumSize: ByteCount): OSStatus; C;
FUNCTION DCMGetFieldInfoAttribute(fieldInfo: DCMFieldInfoRef; VAR attribute: DCMFieldAttribute): OSStatus; C;
FUNCTION DCMGetFieldInfoName(fieldInfo: DCMFieldInfoRef; nameLocale: LocaleIdentifier; fieldName: TextObject): OSStatus; C;
FUNCTION DCMGetFieldInfoNameList(fieldInfo: DCMFieldInfoRef; maxNameNum: ItemCount; VAR numOfName: ItemCount; VAR fieldName: TextObject): OSStatus; C;
FUNCTION DCMGetFieldInfoFindTypeList(fieldInfo: DCMFieldInfoRef; maxMethodNum: ItemCount; VAR numOfMethod: ItemCount; VAR findMethodType: DCMFindMethodType): OSStatus; C;
FUNCTION DCMGetFieldInfoFindNameList(fieldInfo: DCMFieldInfoRef; findMethodType: DCMFindMethodType; maxNameNum: ItemCount; VAR numOfName: ItemCount; VAR findMethodName: TextObject): OSStatus; C;
FUNCTION DCMGetFieldInfoDefaultData(fieldInfo: DCMFieldInfoRef; maxDataSize: ByteCount; VAR actualSize: ByteCount; defaultData: LogicalAddress): OSStatus; C;
{
API for AccessMethod only
}
FUNCTION DCMAddFoundRecordToIterator(keySize: ByteCount; keyData: ConstLogicalAddress; uniqueID: DCMUniqueID; VAR fieldType: DCMFieldType; VAR dataSize: ByteCount; VAR data: ConstLogicalAddress; recordIterator: DCMFoundRecordIterator): OSStatus; C;
kInsert = 0; { Only insert the input entry if there is nothing in the dictionary that matches the key. }
kReplace = 1; { Only replace the entries which match the key with the input entry. }
kInsertOrReplace = 2; { Insert the entry if there is nothing in the dictionary which matches the key, otherwise replaces the existing matched entries with the input entry. }
{ This Was InsertMode }
TYPE
DictionaryDataInsertMode = INTEGER;
CONST
{ Key attribute constants }
kIsCaseSensitive = $10; { case sensitive = 16 }
kIsNotDiacriticalSensitive = $20; { diac not sensitive = 32 }